<?php
function getclassname($infoclass){
	$rs = M("class")->where('classId ="'.$infoclass.'"')->find();
	$classname=$rs['classname'];
	return $classname;
}
function getinfopost($infopost){
	
	if($infopost == 1){
		$str = "<a href=''>审核通过</a>";
	}
	if($infopost == 0){
		$str = "<a href=''>未审核</a>";
	}
	return $str;
}
function getstatus($status){
	$adminid = $vo['adminid'];
	if($status == 1){
		$str = "<a id=''>正常</a>";
	}
	if($status == 0){
		$str = "<a id=''>关闭</a>";
	}
	return $str;
}

function getpage($count,$pagesize = 15){
    $p = new Think\Page($count, $pagesize);
    $p->setConfig('header', '<li class="rows">共<b>%TOTAL_ROW%</b>条记录 第<b>%NOW_PAGE%</b>页/共<b>%TOTAL_PAGE%</b>页</li>');
    $p->setConfig('prev', '上一页');
    $p->setConfig('next', '下一页');
    $p->setConfig('last', '末页');
    $p->setConfig('first', '首页');
    $p->setConfig('theme', '%FIRST%%UP_PAGE%%LINK_PAGE%%DOWN_PAGE%%END%%HEADER%');
    $p->lastSuffix = false;//最后一页不显示为总页数
    return $p;
}

